﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Markup;

namespace Kaesoft.Caja.Views
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            ////Codigo para testear la aplicacion con el uso de otras culturas
            ////
            ////System.Threading.Thread.CurrentThread.CurrentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("es-ES");

            ////Asegurarse que la cultura actual para bindings es la cultura del SO.
            ////Por defecto, WPF usa la cultura en-US, independientemente de la configuracion del SO
            //FrameworkElement.LanguageProperty.OverrideMetadata(
            // typeof(FrameworkElement),
            // new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));

            /***************************************************
            //Transformar informacion en base a la cultara 
            ****************************************************/

            //decimal value = 16325.62m;
            //string specifier;
            //CultureInfo culture;

            //// Use standard numeric format specifiers.
            //specifier = "G";
            //culture = CultureInfo.CreateSpecificCulture("eu-ES");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    16325,62
            //Console.WriteLine(value.ToString(specifier, CultureInfo.InvariantCulture));
            //// Displays:    16325.62

            //specifier = "C";
            //culture = CultureInfo.CreateSpecificCulture("en-US");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    $16,325.62
            //culture = CultureInfo.CreateSpecificCulture("en-GB");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    £16,325.62

            //specifier = "E04";
            //culture = CultureInfo.CreateSpecificCulture("sv-SE");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays: 1,6326E+004   
            //culture = CultureInfo.CreateSpecificCulture("en-NZ");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    1.6326E+004   

            //specifier = "F";
            //culture = CultureInfo.CreateSpecificCulture("fr-FR");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    16325,62
            //culture = CultureInfo.CreateSpecificCulture("en-CA");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    16325.62

            //specifier = "N";
            //culture = CultureInfo.CreateSpecificCulture("es-ES");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    16.325,62
            //culture = CultureInfo.CreateSpecificCulture("fr-CA");
            //Console.WriteLine(value.ToString(specifier, culture));
            //// Displays:    16 325,62

            //specifier = "P";
            //culture = CultureInfo.InvariantCulture;
            //Console.WriteLine((value / 10000).ToString(specifier, culture));
            //// Displays:    163.26 %
            //culture = CultureInfo.CreateSpecificCulture("ar-EG");
            //Console.WriteLine((value / 10000).ToString(specifier, culture));
            //// Displays:    163.256 %



        }
    }
}
